import { defineStore } from 'pinia'
// import { createPersistedStateStorageKey } from '@/store/index'

const STORE_NAME = 'main'

export const useMainStore = defineStore(STORE_NAME, {
  // persist: {
  //   key: createPersistedStateStorageKey(STORE_NAME)
  // },
  state: () => ({
    isShowDialog: false
    // count: 0
  }),
  getters: {
    // countPlus: (state) => state.count + 1,
    // // 返回类型**必须**明确设置
    // countPlus_(): number {
    //   return this.count + 1
    // }
  },
  actions: {
    // async addCount() {
    //   this.count += 1
    // },
    // addCountBy$patch() {
    //   this.$patch((state) => {
    //     state.count += 1
    //   })
    // }
  }
})
